package com.tmsps.ne4weixin.bean.message.send;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.tmsps.ne4weixin.annotation.XStreamCDATA;
import com.tmsps.ne4weixin.bean.message.event.BaseEvent;
import com.tmsps.ne4weixin.bean.message.receive.InBaseMessage;
import com.tmsps.ne4weixin.config.enumeration.MsgTypeEnum;

import lombok.Getter;
import lombok.Setter;

/**
 * @Title: TextMessage.java
 * @Package: com.tmsps.ne4weixin.bean
 * @Description: 被动回复用户消息-回复文本消息
 * @author: hanjiefei
 * @date: 2019-10-18
 * @version V1.0
 * @Copyright: 2019
 */
@XStreamAlias("xml")
@Setter
@Getter
public class OutTextMessage extends OutBaseMessage {
	/**
	 * 必填 是 消息内容（换行：在content中能够换行，微信客户端就支持换行显示）
	 */
	@XStreamCDATA
	@XStreamAlias("Content")
	private String content;

	public OutTextMessage(InBaseMessage inBaseMessage) {
		super(inBaseMessage, MsgTypeEnum.TEXT);
	}

	public OutTextMessage(BaseEvent event) {
		super(event, MsgTypeEnum.TEXT);
	}

	public OutTextMessage(String content) {
		super(MsgTypeEnum.TEXT);
		this.content = content;
	}
}
